﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAPbobsCOM;
using System.Reflection;
using System.Runtime.Serialization;

namespace CompanySyncProject
{
    public class DIStockTransfer : BaseRun
    {
        public DIStockTransfer(Company co, System.IO.StreamWriter lo)
            : base(co, lo)
        {

        }

        public override void Run()
        {
            oCompany.XmlExportType = BoXmlExportTypes.xet_ExportImportMode;
            oCompany.XMLAsString = true;

     
            SAPbobsCOM.StockTransfer obj = oCompany.GetBusinessObject(BoObjectTypes.oStockTransfer);

            obj.CardCode = "01000000019";
            obj.FromWarehouse = "01";
            obj.CardName = "abcd";
            obj.Lines.ItemCode = "1000000217";
            obj.Lines.WarehouseCode = "02";
            obj.Lines.Quantity = 10;
            obj.Lines.Price = 300;
            obj.Lines.ItemDescription = "sdfds";

            obj.Add();
            
            string errMsg = oCompany.GetLastErrorDescription();
        }
    }
}
